<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="lib/vue.js"></script>
</head>
<body>
<div id="app">
<cpn2></cpn2>
</div>
<script>
    // 全局组件注册
    let cpnC1 = Vue.extend({
        template:'<h1>Hello World 世界你好</h1>',
    })

    let cpnC2 = Vue.extend({
        template:'<div><h1>Hello World</h1><cpn1></cpn1></div>',
        components:{
            cpn1:cpnC1
        }
    })
    let vm = new Vue({
        el:'#app',
        // 局部组建注册
        components:{
            cpn2:cpnC2
        }
    })
</script>
</body>
</html>
